package com.gsit.watcher;

import java.io.IOException;
import java.util.Properties;

public class Config {
	private String netLogMinNumbOfPic;
	private String twooMinNumbOfPic;
	
	private User firstUser;
	
	private User secondUser;
	
	private String period;
	private String afterAlaram;

	private String loginUrl;
	private String logoffUrl;
	private String twooURL;
	private String netlogURL;
	private String queuesToCheck;

	private String netlogNormalURL;
	private String netlogARURL;
	private String netlogARStrictURL;

	private String twooProfileURL;
	private String twooPrivateURL;
	private String twooPublicURL;
	private String resourceLocation;
	
	private static Config config = new Config();
	
	public static Config getInstance(){
		return config;
	}

	private Config() {
		Properties prop = new Properties();
		try {
			prop.load(Config.class.getClassLoader().getResourceAsStream(
					"config.properties"));
			
			

			
			firstUser = new User();
			firstUser.setUserName(prop.getProperty("FIRST_LOGIN_USERNAME"));
			firstUser.setPassword(prop.getProperty("FIRST_LOGIN_PASSWORD"));
			
			secondUser = new User();
			secondUser.setUserName(prop.getProperty("SECOND_LOGIN_USERNAME"));
			secondUser.setPassword(prop.getProperty("SECOND_LOGIN_PASSWORD"));
			
			netLogMinNumbOfPic = prop.getProperty("NET_LOG_MIN_NUMB_OF_PIC");
			twooMinNumbOfPic = prop.getProperty("TWOO_LOG_MIN_NUMB_OF_PIC");
			
			period = prop.getProperty("WAIT_PERIOD_FOR_NEXT_RUN");
			afterAlaram = prop.getProperty("WAIT_PERIOD_FOR_ALARM_RUN");
			loginUrl = prop.getProperty("LOGIN_URL");
			logoffUrl = prop.getProperty("LOGOFF_URL");
			queuesToCheck = prop.getProperty("QUEUES_TO_CHECK");
			twooURL = prop.getProperty("TWOO_URL");
			netlogURL = prop.getProperty("NETLOG_URL");

			netlogNormalURL = prop.getProperty("NETLOG_NORMAL_QUEUE_URL");
			netlogARURL = prop.getProperty("NETLOG_AR_QUEUE_URL");
			netlogARStrictURL = prop.getProperty("NETLOG_AR_STRICT_QUEUE_URL");

			twooProfileURL = prop.getProperty("TWOO_PROFILE_QUEUE_URL");
			twooPrivateURL = prop.getProperty("TWOO_PRIVATE_QUEUE_URL");
			twooPublicURL = prop.getProperty("TWOO_PUBLIC_QUEUE_URL");
			resourceLocation = prop.getProperty("RESOURCE_BASE_LOCATION");
			System.out.println(">>>>>>>>>>>>."+prop);

		} catch (IOException ex) {
			ex.printStackTrace();
		}
	}


	public String getPeriod() {
		return period;
	}

	public String getAfterAlaram() {
		return afterAlaram;
	}

	public String getLoginUrl() {
		return loginUrl;
	}

	public String getLogoffUrl() {
		return logoffUrl;
	}

	public String getTwooURL() {
		return twooURL;
	}

	public String getNetlogURL() {
		return netlogURL;
	}

	public String getQueuesToCheck() {
		return queuesToCheck;
	}

	public String getNetlogNormalURL() {
		return netlogNormalURL;
	}

	public String getNetlogARURL() {
		return netlogARURL;
	}

	public String getNetlogARStrictURL() {
		return netlogARStrictURL;
	}

	public String getTwooProfileURL() {
		return twooProfileURL;
	}

	public String getTwooPrivateURL() {
		return twooPrivateURL;
	}

	public String getTwooPublicURL() {
		return twooPublicURL;
	}

	public String getResourceLocation() {
		return resourceLocation;
	}

	
	public User getFirstUser() {
		return firstUser;
	}

	public void setFirstUser(User firstUser) {
		this.firstUser = firstUser;
	}

	public User getSecondUser() {
		return secondUser;
	}

	public void setSecondUser(User secondUser) {
		this.secondUser = secondUser;
	}

	public String getNetLogMinNumbOfPic() {
		return netLogMinNumbOfPic;
	}

	public void setNetLogMinNumbOfPic(String netLogMinNumbOfPic) {
		this.netLogMinNumbOfPic = netLogMinNumbOfPic;
	}

	public String getTwooMinNumbOfPic() {
		return twooMinNumbOfPic;
	}

	public void setTwooMinNumbOfPic(String twooMinNumbOfPic) {
		this.twooMinNumbOfPic = twooMinNumbOfPic;
	}

}
